<?php if($userPhones):?>
    <ul class="list-group">
        <?php foreach($userPhones as $phone):?>
            <li class="list-group-item">
                <?php if(count($userPhones) > 1):?> 
                    <span class="phone_radio">
                        <input phone_value="<?php echo $phone->phone?>" id="phone_id_<?php echo $phone->id?>" title="Đặt làm SĐT chính" type="radio" name="is_main" value="<?php echo $phone->id?>" <?php if($phone->is_main):?>checked="checked"<?php endif?>>
                    </span>
                <?php endif?>

                <span class="phone">
                    <label for="phone_id_<?php echo $phone->id?>"><?php echo $phone->phone?></label>
                </span>

                <?php if(count($userPhones) > 1):?> 
                    <?php if($phone->is_main):?>
                        <span class="phone_main label label-success">
                            <i class="fa fa-phone"></i> <?php if($phone->is_main):?>SĐT chính<?php endif?>
                        </span>
                        <?php else:?>
                            <button class="btn label label-danger phone_remove" phone_id="<?php echo $phone->id?>" phone="<?php echo $phone->phone?>" title="Xóa SĐT <?php echo $phone->phone?>"><i class="fa fa-times"></i> Xóa</button>
                        <?php endif?>
                    <?php endif?>

            </li>
            <?php endforeach?>
    </ul>

    <?php else:?>
    <div>Tài khoản của bạn chưa có SĐT di động nào</div>
    <?php endif?>
